home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / FNTNS / BINGRAYT.ASM < prev    next >
Assembly Source File  |  1989-01-24  |  1KB  |  32 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Binary to Gray Coded Value Test Program
  6. ; Last Update 30 Mar 87   Version 1.0
  7. ;
  8. bingrayt        ident   1,0
  9. ;
  10. ;       binary value to gray coded value test program
  11. ;
  12.         opt     cex
  13.         page    132,66,0,0
  14.         nolist
  15.         include 'dsplib:ioequ'
  16.         list
  17.         include 'dsplib:bingray'
  18.  
  19.         org     p:$100
  20. start
  21.         clr     b       #>1,x1          ;clear count, load increment
  22.         move    #0,r0                   ;pointer to memory
  23.         move    #-1,m0                  ;linear addressing
  24.         do      #64,_endtest
  25.         tfr     b,a                     ;value to convert
  26.         bingray                         ;convert a1 to gray code (uses x0)
  27.         add     x1,b  a1,x:(r0)+        ;inc b, save result in memory
  28. _endtest
  29.         end
  30.